package com.wc.wcWebsite_core.config;

import java.nio.charset.Charset;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.web.client.RestTemplate;

@Configuration
public class RestConfiguration {

	@Autowired
	private RestTemplateBuilder builder;
	
	@Bean
	public RestTemplate getRestTemplate() {
		StringHttpMessageConverter m = new StringHttpMessageConverter(
				Charset.forName("UTF-8"));
		//return builder.additionalMessageConverters(m).build();
		return builder.build();
	}
}
